﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestWork2
{
    class Human
    {
        private string firstName;
        private string lastName;
        private DateTime birthDay;

        public string HumanFirstName
        {
            get
            {
                return firstName;
            }
            set
            {
                if (value == null)
                {
                    Console.WriteLine("First name shouldn't be null");
                }
                else
                {
                    firstName = value;
                }
            }
   
        }

        public string HumanLastName
        {
            get
            {
                return lastName;
            }
            set
            {
                if (value == null)
                {
                    Console.WriteLine("Last name shouldn't be null");
                }
                else
                {
                    lastName = value;
                }
            }

        }

        public DateTime HumanBirthday
        {
            get
            {
                return birthDay;
            }
            set
            {
                if (value > DateTime.Today)
                {
                    Console.WriteLine("Birth day shouldn't be from future");
                }
                else
                {
                    birthDay = value;
                }
            }
        }

        public Human(string firstName, string lastName, DateTime birthDay)
        {
            HumanFirstName = firstName;
            HumanLastName = lastName;
            HumanBirthday = birthDay;
        }

        public Human()
        {

        }

    }
}
